#pragma once

#include "ftp/Types.h"
#include "ftp/IChannel.h"

namespace ftp
{

class AsioChannel : public IChannel
{
public:
	AsioChannel(SocketSPtr socket);

	virtual void asyncWrite(const char* buffer, size_t bufferSize);
	virtual void asyncRead(); 

private:
	void handleDataWrote(const boost::system::error_code& e);
	void handleDataRead(const boost::system::error_code& e, const size_t bytesWrote);

private:
	SocketSPtr m_socket;
	char m_inBuffer[1000];
};

} //ftp

